package com.c.ctgproject.wiget

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.animation.AlphaAnimation
import android.widget.LinearLayout
import com.c.ctgproject.R
import com.c.ctgproject.ui.sell.parts.PartsSellActivity
import com.c.ctgproject.utils.MyLog
import kotlinx.android.synthetic.main.item_part_sell_list.view.*

/**
 *作者:LiBW
 *创建日期: 2020/9/10
 *描述:
 */
class SellPartWidget(context: Context, attrs: AttributeSet? = null) : LinearLayout(context, attrs) {
    private val activity: PartsSellActivity = context as PartsSellActivity

    init {
        LayoutInflater.from(context).inflate(R.layout.item_part_sell_list, this)
        mDeleteItemTV.setOnClickListener {
            activity.refreshItem()
        }
        animation = AlphaAnimation(0f, 1f)
        animation.duration = 300
    }
}